home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / RTANKSRC.ZIP / NEWLOAD.H < prev    next >
Text File  |  1989-05-11  |  3KB  |  129 lines

  1. #include "radio.h"
  2.  
  3. #define   TOKEN    struct token_type
  4. #define p_TOKEN    TOKEN *
  5. #define   LINE     struct line_type
  6. #define p_LINE     LINE far *
  7. #define   ARG      struct arg_type
  8. #define p_ARG      ARG far *
  9. #define   TANK     struct tank_type
  10. #define p_TANK     TANK *
  11. #define   LINER    struct liner_type
  12. #define p_LINER    LINER *
  13. #define   RESOLVE  struct resolve_type
  14. #define p_RESOLVE  RESOLVE *
  15. #define   SYMB     struct symbol_type
  16. #define p_SYMB     SYMB *
  17.  
  18. #define MAXPLAYERS 10
  19. #define BAD        -1
  20. #define MAXTOKENS  20
  21.  
  22. #define   TANKTILE struct tanktile_type
  23. #define p_TANKTILE TANKTILE *
  24.  
  25. TANKTILE {
  26.     int image[4];
  27. };
  28.  
  29. TOKEN {
  30.    char token[20];
  31. };
  32.  
  33. SYMB {
  34.      TOKEN   symbol;
  35.      int     memloc;
  36.      p_SYMB  next_symbol;
  37. };
  38.  
  39. RESOLVE {
  40.  
  41.    TOKEN     lineref;
  42.    p_RESOLVE next_resolve;
  43. };
  44.  
  45. TANK {
  46.  
  47.     TANKTILE pic[8];
  48.     TANKTILE save;
  49.     int      var[50];
  50.     int      cpoint;
  51.     int      cgpoint;
  52.     int      px,py;
  53.     char     basefilename[20];
  54.     BOOL     boom;
  55.     BOOL     jiggle;
  56.     BOOL     nomove;
  57.     int      bwait;
  58.     p_LINE   prog;
  59.     p_LINE   cline;
  60.     p_LINE   gosub[20];
  61.     int      depth;
  62.     int      team;
  63.     int      nhits;
  64.     int      cweapon;
  65.     BOOL     hit;
  66.     BOOL     automove;
  67.     BOOL     autolock;
  68.     BOOL     jammer;
  69.     int      blockage;
  70.     int      channel;
  71.     CHANNEL  station;
  72.     DWORD    time;
  73.     DWORD    died;
  74.     int      secs;
  75. };
  76.  
  77. LINER {
  78.    p_LINE  lineref;
  79.    TOKEN   lsymbol;
  80.    p_LINER next_liner;
  81. };
  82.  
  83. ARG {
  84.    int    atype;
  85.    int    value;
  86.    p_LINE linedest;
  87. };
  88.  
  89. LINE {
  90.    int    command;
  91.    ARG    arg1, arg2, arg3, arg4;
  92.    int    pline;
  93.    p_LINE nextline;
  94. };
  95.  
  96. void fill_structure(TOKEN t[], int nt);
  97. void parse_line(PSTR l);
  98. void nuke_argument(p_ARG a);
  99. void nuke_line_contents(p_LINE l);
  100. BOOL exist(PSTR s);
  101. void compile_program(p_TANK t);
  102. int create_new_player(PSTR s);
  103. void init_structures(void);
  104. void add_resolve(p_TOKEN t);
  105. p_LINE find_lineref(p_TOKEN t);
  106. p_LINE create_newline(void);
  107. void add_line(p_TANK t, p_LINE l);
  108. void add_lineref(p_TOKEN t);
  109. BOOL parse_arg(p_ARG a, p_TOKEN t);
  110. void fill_s(p_TOKEN t1);
  111. void fill_a(p_TOKEN t1);
  112. void fill_aal(p_TOKEN t1, p_TOKEN t2, p_TOKEN t3);
  113. void fill_sa(p_TOKEN t1,p_TOKEN t2);
  114. void fill_l(p_TOKEN t1);
  115. int find_symbol(p_TOKEN t);
  116. void add_symbol(p_TOKEN t);
  117. void check_link(p_ARG a, int pl);
  118. void resolve_references(p_TANK t);
  119. void list_symbol_table(void);
  120. int n_compile_player(p_PLAYER p);
  121. void free_compiler_ram(void);
  122. void list_program_structure(p_TANK t);
  123. void explain_arg(p_ARG a);
  124. void explain_line(p_LINE l);
  125. p_TANK get_tank_pointer(int n);
  126. void create_token(p_TOKEN t, PSTR s);
  127. void fill_aaa(p_TOKEN t1, p_TOKEN t2, p_TOKEN t3);
  128. void fill_sss(p_TOKEN t1, p_TOKEN t2, p_TOKEN t3);
  129. void fill_aas(p_TOKEN t1, p_TOKEN t2, p_TOKEN t3);